package com.hjm.project.actTransactionCompliance.compliance.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.project.actTransactionCompliance.compliance.mapper.ActTransactionComplianceMapper;
import com.hjm.project.actTransactionCompliance.compliance.domain.ActTransactionCompliance;
import com.hjm.project.actTransactionCompliance.compliance.service.IActTransactionComplianceService;
import com.hjm.common.utils.text.Convert;

/**
 * 交易额返现阶梯Service业务层处理
 * 
 * @author LOVE
 * @date 2020-11-29
 */
@Service
public class ActTransactionComplianceServiceImpl implements IActTransactionComplianceService 
{
    @Autowired
    private ActTransactionComplianceMapper actTransactionComplianceMapper;

    /**
     * 查询交易额返现阶梯
     * 
     * @param id 交易额返现阶梯ID
     * @return 交易额返现阶梯
     */
    @Override
    public ActTransactionCompliance selectActTransactionComplianceById(Long id)
    {
        return actTransactionComplianceMapper.selectActTransactionComplianceById(id);
    }

    @Override
    public List<Map<String, Object>> getActTransactionCompliance(Map<String, String> map) throws Exception {
        return actTransactionComplianceMapper.getActTransactionCompliance(map);
    }

    /**
     * 查询交易额返现阶梯列表
     * 
     * @param actTransactionCompliance 交易额返现阶梯
     * @return 交易额返现阶梯
     */
    @Override
    public List<ActTransactionCompliance> selectActTransactionComplianceList(ActTransactionCompliance actTransactionCompliance)
    {
        return actTransactionComplianceMapper.selectActTransactionComplianceList(actTransactionCompliance);
    }

    /**
     * 新增交易额返现阶梯
     * 
     * @param actTransactionCompliance 交易额返现阶梯
     * @return 结果
     */
    @Override
    public int insertActTransactionCompliance(ActTransactionCompliance actTransactionCompliance)
    {
        return actTransactionComplianceMapper.insertActTransactionCompliance(actTransactionCompliance);
    }

    /**
     * 修改交易额返现阶梯
     * 
     * @param actTransactionCompliance 交易额返现阶梯
     * @return 结果
     */
    @Override
    public int updateActTransactionCompliance(ActTransactionCompliance actTransactionCompliance)
    {
        return actTransactionComplianceMapper.updateActTransactionCompliance(actTransactionCompliance);
    }

    /**
     * 删除交易额返现阶梯对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteActTransactionComplianceByIds(String ids)
    {
        return actTransactionComplianceMapper.deleteActTransactionComplianceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除交易额返现阶梯信息
     * 
     * @param id 交易额返现阶梯ID
     * @return 结果
     */
    @Override
    public int deleteActTransactionComplianceById(Long id)
    {
        return actTransactionComplianceMapper.deleteActTransactionComplianceById(id);
    }

    @Override
    public int getNextval() throws Exception {
        return actTransactionComplianceMapper.getNextval();
    }
    @Override
    public boolean addActTransactionCompliance(Map<String, Object> map) throws Exception {
        return actTransactionComplianceMapper.addActTransactionCompliance(map)>0;
    }

    @Override
    public boolean updateActTransactionCompliances(Map<String, Object> map) throws Exception {
        return actTransactionComplianceMapper.updateActTransactionCompliances(map)>0;
    }
}
